package CAODemo;

public class Test {

}
class Person {
    public String name ;
    public int age ;
    public String sex ;
    public void eat () {
        System.out.println("吃饭");
    }
    public void walk () {
        System.out.println("走路");
    }
    public void sleep () {
        System.out.println("睡觉");
    }

    public static void main(String[] args) {
        Person A = new Person();
        A.age = 19;
        A.name = "小明";
        A.sex = "男";
        A.eat();
        A.walk();
        A.sleep();
        Person B = new Person();
        B.name = "小红";
        B.age = 18;
    }
}
